package com.moorror.codegenvel.view.window.codegenxrender.domain;

import com.moorror.codegenvel.common.table.AColumnDesc;
import com.moorror.codegenvel.common.table.ColumnValueEnum;
import com.moorror.codegenvel.common.table.bean.AbstractTableStringRow;
import com.moorror.codegenvel.view.window.codegen.domain.TableConstant;
import lombok.Data;

/**
 * @Author jiyanghuang
 * @Date 2025/8/24 17:47
 */
@Data
public class TableSchemaColumnDesc extends AbstractTableStringRow<TableSchemaColumnDesc> {

    /**
     * 原生列名
     */
    @AColumnDesc(nameShow = "columnName", order = 20, cellEditable = false)
    private String columnName;

    /**
     * 名称
     */
    @AColumnDesc(nameShow = "name", order = 10)
    private String name;


    /**
     * 全类型
     */
    @AColumnDesc(nameShow = "typeJava", order = 30, valueTypeValuesKey = TableConstant.TYPES_KEY, valueType = ColumnValueEnum.SELECT)
    private String typeJava;

    /**
     * 注释
     */
    @AColumnDesc(nameShow = "comment", order = 40)
    private String comment;

    /**
     * 字段标题
     */
    @AColumnDesc(nameShow = "title", order = 50)
    private String title;

    /**
     * 字段标题
     */
    @AColumnDesc(nameShow = "widget", order = 70, valueTypeValuesKey = TableConstant.KEY_WIDGET_TYPE, valueType = ColumnValueEnum.SELECT)
    private String widget;

    /**
     * 是否选中
     */
    @AColumnDesc(nameShow = "checked", order = 80, valueType = ColumnValueEnum.CHECKBOX)
    private boolean checked = false;

    /**
     * 是否选中
     */
    @AColumnDesc(nameShow = "required", order = 90, valueType = ColumnValueEnum.CHECKBOX)
    private boolean required = false;

    /**
     * 是否选中
     */
    @AColumnDesc(nameShow = "requiredMessage", order = 100)
    private String requiredMessage = "";


    /**
     * 是否选中
     */
    @AColumnDesc(nameShow = "defaultValue", order = 110)
    private String defaultValue = "";

}
